package com.orange.core.pojo.entity.carpark;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.orange.core.pojo.entity.ICreateModel;
import com.orange.core.pojo.entity.IIntIdModel;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Accessors(chain = true)
public class CarParkOrder implements IIntIdModel<CarParkOrder>, ICreateModel<CarParkOrder> {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer userId;

    @TableField(exist = false)
    private String nickname;

    /**
     * 用户车辆id
     */
    private Integer userCarId;

    /**
     * 车牌
     */
    private String plateNo;

    /**
     * 停车地点
     */
    private String parkName;;

    /**
     * 停车订单号
     */
    private String parkOrderNo;

    /**
     * 入场时间
     */
    private LocalDateTime entryTime;

    /**
     * 停车时长
     */
    private String parkDuration;

    /**
     * 停车费总额
     */
    private BigDecimal totalAmount;

    /**
     * 支付积分
     */
    private Integer paidCredit;

    /**
     * 抵扣金额（元）
     */
    private BigDecimal deductAmount;

    /**
     * 优惠方案编号
     */
    private String couponSolutionNo;

    @TableField(fill = FieldFill.INSERT)
    private Integer createBy;

    private LocalDateTime createTime;
}
